package com.wangys.controller;

import com.wangys.entities.Address;
import com.wangys.mapper.AddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@ResponseBody
@CrossOrigin
@RequestMapping("/address")
public class AddressController {
    @Autowired(required = false)
    private AddressMapper addressMapper;

    @RequestMapping("/select")
    public List<Address> select(){
        return addressMapper.select();
    }
}
